package com.xbts.system.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xbts.system.domain.SeiTask;
import com.xbts.system.domain.SeiTemplate;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 模板Mapper接口
 *
 * @author xbts
 * @date 2023-08-22
 */
public interface SeiTemplateMapper extends BaseMapper<SeiTemplate> {

    @Select("SELECT u.nick_name as affiliation_name, ty.name as template_type_name, t.* " +

            "FROM sei_template t " +
            "LEFT JOIN sei_template_type ty on t.template_type_id = ty.template_type_id " +
            "LEFT JOIN sys_user u on t.create_by = u.user_id " +
            " ${ew.customSqlSegment}")
    List<SeiTemplate> selectTemplateList(@Param(Constants.WRAPPER) QueryWrapper<SeiTemplate> queryWrapper);
}
